/*
 * Copyright (c) 2025 Industrial Software Feature Database
 */
package com.comac.ins.isfd.strategy;


import java.util.List;
import java.util.Map;

import org.springframework.context.annotation.Bean;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Configuration;

import com.comac.ins.isfd.util.bdfparser.enums.FastenerCodeGenerationEnum;


@Configuration
public class FastenerCodeGenerationStrategyFactory {

    @Bean("fastenerCodeGenerationMap")
    public Map<String, FastenerCodeGenerationStrategy> dataDimensionMap(@Qualifier("fastenerNasmDashCodeGenerationStrategy") FastenerNasmDashCodeGenerationStrategy fastenerNasmDashCodeGenerationStrategy,
                                                                        @Qualifier("fastenerStandardCodeGenerationStrategy") FastenerStandardCodeGenerationStrategy fastenerStandardCodeGenerationStrategy) {
        return Map.of(FastenerCodeGenerationEnum.NASM_DASH.getType(), fastenerNasmDashCodeGenerationStrategy,
            FastenerCodeGenerationEnum.STANDARD.getType(), fastenerStandardCodeGenerationStrategy);
    }

    public static final FastenerCodeGenerationStrategy EMPTY_STRATEGY = context -> List.of();
}
